package com.ws.demo4;

import com.alibaba.fastjson.JSON;

import java.util.List;

/**
 * 泛型测试类
 */
public class Generic {
    public static <T> T func01(Class<T> clazz){
        try {
           return clazz.newInstance ();
        } catch (Exception e) {
            e.printStackTrace ();
        }
        return null;
    }
    public static <T> List<T> func02(Class<T> clazz){
        return JSON.parseArray ("", clazz);

    }
}
